package com.xuxiangyang.competitionsystem.service;

import com.xuxiangyang.competitionsystem.entities.Artical;
import com.xuxiangyang.competitionsystem.mapper.ArticalMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticalServiceImpl implements IArticalService {

    @Autowired
    private ArticalMapper articalMapper;

    @Override
    public void insert(Artical artical) {
        articalMapper.insert(artical);
    }

    @Override
    public List<Artical> getListAll() {
        return articalMapper.getListAll();
    }

    @Override
    public List<Artical> getListByNews() {
        return articalMapper.getListByNews();
    }

    @Override
    public List<Artical> getListByNotice() {
        return articalMapper.getListByNotice();
    }

    @Override
    public List<Artical> getListByDownload() {
        return articalMapper.getListByDownload();
    }

    @Override
    public void deleteById(Artical artical) {
        articalMapper.deleteById(artical);
    }

    @Override
    public void updateArtical(Artical artical) {
        articalMapper.updateArtical(artical);
    }
}
